package com.biscuit.page.basicservice.design.verify_code.publish.factory;

import com.biscuit.page.basicservice.design.verify_code.publish.strategy.AbstractVerifyCodePublishStrategy;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;

import java.util.List;

/**
 * @author biscuit
 * @createTime 2024/6/25 11:16
 */
@Configuration
public class VerifyCodePublishStrategyFactoryConfiguration {

    @Bean
    @Primary
    public VerifyCodePublishStrategyFactory initVerifyCodePublishStrategyFactory(List<AbstractVerifyCodePublishStrategy> strategyList) {
        VerifyCodePublishStrategyFactory factory = new VerifyCodePublishStrategyFactory();
        factory.setStrategyList(strategyList);
        return factory;
    }

}
